<html>

<h1>Edit Event</h1>

<%= form_for @event do |f| %>

	<% if @event.errors.any? %>
	<h2>Errors:</h2>
	<ul>

<% @event.errors.full_messages.each do |message| %>

<li><%= message %></li>
<%end %>

	</ul>
	<%end%>
	</br>

	<p>Title: <br/>
		<%= f.text_field(:title) %>

	<p>Description: <br/>
	 <%= f.text_area(:description) %></p>

	<p>Dates:  &nbsp; <%=f.text_field(:start_date, :placeholder => "DD/MM/YYYY", :style=>'width: 90px;')%> to <%=f.text_field(:end_date, :placeholder => "DD/MM/YYYY", :style=>'width: 90px;')%></p>

	<p>Photo: <br/>
		<%=f.file_field(:photo)%></p> 

	<p>
		<%= f.submit "Done" %>

	</p>

<% end %>

<script type="text/javascript">
$(document).ready(
function() {
$('#event_description').redactor();
}
);
</script>
</html>
